import type { FC, PropsWithChildren } from "react";
import Head from "./components/title";
import Entries from "./Entries";
import ItemWraper from "./components/ItemWraper";

interface Props {
  name: string;
  Title?: FC<
    PropsWithChildren<{
      name: string;
    }>
  >;
}
function Index({ name, Title }: Props) {
  let com = <Head name={name} />;
  if (Title) {
    com = <Title name={name} />;
  }
  return (
    <ItemWraper>
      {com}
      <Entries name={name}></Entries>
    </ItemWraper>
  );
}

export default Index;
